﻿@using StudMap.Core.Maps
@model StudMap.Core.ListResponse<StudMap.Core.Maps.Map>
@{
    Layout = null;
}

@if (Model != null && Model.List.Any())
{
    <div class="table">
        <div class="tableCell Headline">
            <div class="tableRow">MapId</div>
            <div class="tableRow">Name</div>
            <div class="tableRow"></div>
        </div>
        @foreach (Map map in Model.List)
        {
            <div class="tableCell">
                <div class="tableRow" onclick=" Admin.loadFloors(@map.Id) ">@map.Id</div>
                <div class="tableRow" onclick=" Admin.loadFloors(@map.Id) ">@map.Name</div>
                <div class="tableRow" onclick=" Admin.deleteMap(@map.Id) "><img class="DeleteBin" src="@Url.Content("~/Images/bin.png")" alt="Bin"/></div>
            </div>
        }
    </div>
    <div>@Html.ActionLink("Anlegen", "CreateMap", "Admin")</div>
}
else
{
    <div>Es wurden noch keine Karten angelegt. Neue Karte @Html.ActionLink("erstellen", "CreateMap", "Admin")?</div>
}